]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaceThumbnail: don't move transient windows for workspaces
authorBradley Pankow <BTPankow.gnome@gmail.com>
Tue, 30 Jul 2013 20:35:52 +0000 (16:35 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 30 Jul 2013 22:40:51 +0000 (18:40 -0400)
When we shift workspaces to create a blank one for a window or
application, all of the window actors are shifted down.  However, some
of these window actors are transient windows attached to a main window.
When these windows are moved to a different workspace, the main window
is moved along with it. When the main window is moved, these windows
are also moved. This creates a double move of the windows.
This double movement leads to unexpected results where workspaces are
collapsed and windows are in incorrect positions.
This patch prevents movement of these transient windows, only grabbing
the main (ancestor) windows to move to a different workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=705174

js/ui/workspaceThumbnail.js

index c5cd7e36084983705c8f5f091e7928b927d75f99..d8532806ee48c2936233432bc87c1519e8f67ede 100644 (file)
@@ -739,6 +739,10 @@ const ThumbnailsBox = new Lang.Class({
 
             // Nab all the windows below us.
             let windows = global.get_window_actors().filter(function(win) {
+                // If the window is attached to an ancestor, we don't need/want to move it
+                if (!!win.meta_window.get_transient_for())
+                    return false;
+                
                 if (isWindow)
                     return win.get_workspace() >= newWorkspaceIndex && win != source;
                 else